]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Adjust the position of the close button
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 20 Aug 2012 20:44:28 +0000 (16:44 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 20 Aug 2012 22:06:52 +0000 (18:06 -0400)
Make this closer to the mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=682253

data/theme/gnome-shell.css
js/ui/messageTray.js

index cfdefd87d005d3cbb482358ffaa0d8c830c3bc36..3512d5ab4cbdfa5a71c18f089452f3a1e5612e56 100644 (file)
@@ -615,7 +615,16 @@ StButton.popup-menu-item:insensitive {
 }
 
 .notification-close {
-    -shell-close-overlap: 14px;
+    /* we start out in the top right of the
+     * notification, inset.
+     *
+     * center is 32px/2 = 17px
+     *
+     * adjust left 2px
+     * adjust down 8px */
+
+    -shell-close-overlap-x: 15px;
+    -shell-close-overlap-y: 12px;
 }
 
 .window-close:rtl {
index 95044a19c65b6d7203baca660a9762c9797b9ae3..82dea0ac521e203b9240aa33257284d244360d38 100644 (file)
@@ -236,9 +236,10 @@ function makeCloseButton() {
 
     closeButton.connect('style-changed', function() {
         let themeNode = closeButton.get_theme_node();
-        let overlap = themeNode.get_length('-shell-close-overlap');
-        closeButton.translation_x = overlap;
-        closeButton.translation_y = -overlap;
+        closeButton.translation_x = themeNode.get_length('-shell-close-overlap-x');
+
+        // libcroco doesn't support negative units
+        closeButton.translation_y = -themeNode.get_length('-shell-close-overlap-y');
     });
 
     return closeButton;